<template>
  <div id="tab-bar">
    <van-tabbar v-model="active" active-color="rgb(253, 97, 3)"
    @change="clickTab"
    >
      <van-tabbar-item icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item icon="hotel-o">课程</van-tabbar-item>
      <van-tabbar-item icon="tosend">练习</van-tabbar-item>
      <van-tabbar-item icon="orders-o">约课</van-tabbar-item>
      <van-tabbar-item icon="manager-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>


<script>
import Vue from 'vue';
import { Tabbar, TabbarItem, Icon} from 'vant';
import "vant/lib/tabbar/style"
import "vant/lib/tabbar-item/style"
import "vant/lib/icon/style"

Vue.use(Icon);
Vue.use(Tabbar);
Vue.use(TabbarItem);
export default {
  name:"TabBar",
  data() {
    return {
      active: 0
    }
  },
  methods: {
    clickTab(i){
      this.$emit("tabIndex",i)
    }
  },
}
</script>

<style scoped>

</style>